package cn.longge.mapper;

import cn.longge.entity.SysOffice;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SysOfficeMapper extends Mapper<SysOffice> {
    @Select("select so.id,so.`name`,so.parent_id from sys_office so,sys_role_office sro \n" +
            "where so.del_flag = '0' \n" +
            "and sro.office_id = so.id \n" +
            "and sro.role_id = #{rid}")
    List<SysOffice> selectByRid(long rid);
}